package com.ibeeking.found.upms.s.rest.service;

import com.ibeeking.found.upms.service.common.bo.ShopRoleTenantAuthRoleBO;
import com.ibeeking.found.upms.service.common.param.AuthRoleShopRoleParam;
import com.ibeeking.found.upms.service.common.param.ShopRoleAuthRoleParam;
import com.ibeeking.found.upms.service.common.vo.TenantAuthRoleVO;

import java.util.List;

/**
 * @ClassName IShopRoleAuthService
 * @Description
 * @Author ibeeking
 * @Date 2021-04-27 13:42
 **/
public interface IShopRoleAuthService {

    /**
     * 可授权角色列表
     *
     * @return
     */
    List<TenantAuthRoleVO> effectiveAuthList();

    /**
     * 商户角色关联租户授权角色
     *
     * @param shopId
     * @param param
     * @return
     */
    Boolean authRoleByShopRoleId(Long shopId, AuthRoleShopRoleParam param);

    /**
     * 租户授权角色关联商户角色
     *
     * @param shopId
     * @param param
     * @return
     */
    Boolean shopRoleByAuthRoleId(Long shopId, ShopRoleAuthRoleParam param);

    /**
     * 根据商户角色查询已授权租户角色id列表
     *
     * @param shopId
     * @param shopRoleId
     * @return
     */
    List<ShopRoleTenantAuthRoleBO> queryByShopRoleId(Long shopId, Long shopRoleId);

    /**
     * 根据租户授权角色查询已被授权商户角色id列表
     *
     * @param shopId
     * @param authRoleId
     * @return
     */
    List<ShopRoleTenantAuthRoleBO> queryByAuthRoleId(Long shopId, Long authRoleId);

    /**
     * 查询当前租户用户被授权商户id列表
     *
     * @param shopId
     * @param tenantUserId
     * @return
     */
    List<ShopRoleTenantAuthRoleBO> queryAuthShopIds(Long shopId, Long tenantUserId);
}
